var mongoose=require('mongoose');
var Attendance=require('./attendance.js');
mongoose.connect('mongodb://localhost/attendance');

var start=+new Date(2017,3,11),end=start+1000*3600*24;
console.log(new Date(start),new Date(end));

Attendance.find({time:{$gte:start,$lte:end}},(err,data)=>{
    console.error('ERROR:',err);
    console.log('data:',data);
});